package com.training.java.core.homework04;

// Derived class that inherits Player.
public class SoccerPlayer extends Player {

	private double thighMeasure;
	private SoccerFootWorkSkills footworkskills;

	public SoccerPlayer(double height, double weight, int fitness,
			double thighMeasure, SoccerFootWorkSkills footworkskills) {
		super(height, weight, fitness);
		this.thighMeasure = thighMeasure;
		this.footworkskills = footworkskills;
	}

	// Abstract class in Player is implemented here.
	public void doPractice(double hours) {
		this.thighMeasure = this.thighMeasure * hours * 1.05;

		if (hours < 5) {
			footworkskills = SoccerFootWorkSkills.F;
		}
		if (hours >= 5 && hours < 6) {
			footworkskills = SoccerFootWorkSkills.E;
		}
		if (hours >= 6 && hours < 7) {
			footworkskills = SoccerFootWorkSkills.D;
		}
		if (hours >= 7 && hours < 8) {
			footworkskills = SoccerFootWorkSkills.C;
		}
		if (hours >= 8 && hours < 9) {
			footworkskills = SoccerFootWorkSkills.B;
		}
		if (hours >= 9) {
			footworkskills = SoccerFootWorkSkills.A;
		}
	}

	public double getThighMeasure() {
		return thighMeasure;
	}

	public SoccerFootWorkSkills getFootworkskills() {
		return footworkskills;
	}
}
